home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2567 < prev    next >
Mailbox/MIME Entity  |  1996-08-06  |  2.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 65 63 | 63 64 62 31 2e 70 6d 73 |Path: ec|cdb1.pms|
|00000010| 2e 66 6f 72 64 2e 63 6f | 6d 21 75 73 65 6e 65 74 |.ford.co|m!usenet|
|00000020| 0a 46 72 6f 6d 3a 20 4b | 65 6e 74 6f 6e 20 53 6d |.From: K|enton Sm|
|00000030| 69 74 68 20 3c 73 6d 69 | 74 68 65 6b 40 69 78 2e |ith <smi|thek@ix.|
|00000040| 6e 65 74 63 6f 6d 2e 63 | 6f 6d 3e 0a 4e 65 77 73 |netcom.c|om>.News|
|00000050| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 6c 61 6e |groups: |comp.lan|
|00000060| 67 2e 63 2b 2b 0a 53 75 | 62 6a 65 63 74 3a 20 52 |g.c++.Su|bject: R|
|00000070| 65 3a 20 42 43 34 35 2c | 20 75 73 69 6e 67 20 61 |e: BC45,| using a|
|00000080| 20 66 75 6e 63 74 69 6f | 6e 20 69 6e 20 61 6e 6f | functio|n in ano|
|00000090| 74 68 65 72 20 70 72 6f | 6a 65 63 74 2e 0a 44 61 |ther pro|ject..Da|
|000000a0| 74 65 3a 20 31 38 20 4a | 61 6e 20 31 39 39 36 20 |te: 18 J|an 1996 |
|000000b0| 31 33 3a 35 33 3a 30 32 | 20 47 4d 54 0a 4f 72 67 |13:53:02| GMT.Org|
|000000c0| 61 6e 69 7a 61 74 69 6f | 6e 3a 20 49 6e 6e 6f 76 |anizatio|n: Innov|
|000000d0| 69 73 69 6f 6e 20 54 65 | 63 68 6e 6f 6c 6f 67 69 |ision Te|chnologi|
|000000e0| 65 73 20 49 6e 63 6f 72 | 70 6f 72 61 74 65 64 0a |es Incor|porated.|
|000000f0| 4d 65 73 73 61 67 65 2d | 49 44 3a 20 3c 34 64 6c |Message-|ID: <4dl|
|00000100| 6a 62 75 24 36 32 66 40 | 65 63 63 64 62 31 2e 70 |jbu$62f@|eccdb1.p|
|00000110| 6d 73 2e 66 6f 72 64 2e | 63 6f 6d 3e 0a 52 65 66 |ms.ford.|com>.Ref|
|00000120| 65 72 65 6e 63 65 73 3a | 20 3c 34 64 66 61 30 36 |erences:| <4dfa06|
|00000130| 24 65 75 69 40 6e 65 77 | 73 73 65 72 76 65 72 2e |$eui@new|sserver.|
|00000140| 74 72 6c 2e 4f 5a 2e 41 | 55 3e 0a 4e 4e 54 50 2d |trl.OZ.A|U>.NNTP-|
|00000150| 50 6f 73 74 69 6e 67 2d | 48 6f 73 74 3a 20 70 6d |Posting-|Host: pm|
|00000160| 73 62 32 32 2e 70 6d 73 | 2e 66 6f 72 64 2e 63 6f |sb22.pms|.ford.co|
|00000170| 6d 0a 4d 69 6d 65 2d 56 | 65 72 73 69 6f 6e 3a 20 |m.Mime-V|ersion: |
|00000180| 31 2e 30 0a 43 6f 6e 74 | 65 6e 74 2d 54 79 70 65 |1.0.Cont|ent-Type|
|00000190| 3a 20 74 65 78 74 2f 70 | 6c 61 69 6e 3b 20 63 68 |: text/p|lain; ch|
|000001a0| 61 72 73 65 74 3d 75 73 | 2d 61 73 63 69 69 0a 43 |arset=us|-ascii.C|
|000001b0| 6f 6e 74 65 6e 74 2d 54 | 72 61 6e 73 66 65 72 2d |ontent-T|ransfer-|
|000001c0| 45 6e 63 6f 64 69 6e 67 | 3a 20 37 62 69 74 0a 58 |Encoding|: 7bit.X|
|000001d0| 2d 4d 61 69 6c 65 72 3a | 20 4d 6f 7a 69 6c 6c 61 |-Mailer:| Mozilla|
|000001e0| 20 31 2e 32 4e 20 28 57 | 69 6e 64 6f 77 73 3b 20 | 1.2N (W|indows; |
|000001f0| 49 3b 20 31 36 62 69 74 | 29 0a 54 6f 3a 20 74 2e |I; 16bit|).To: t.|
|00000200| 68 61 6e 64 40 74 72 6c | 2e 6f 7a 2e 61 75 0a 0a |hand@trl|.oz.au..|
|00000210| 74 2e 68 61 6e 64 40 74 | 72 6c 2e 6f 7a 2e 61 75 |t.hand@t|rl.oz.au|
|00000220| 20 28 54 72 65 76 6f 72 | 20 48 61 6e 64 29 20 77 | (Trevor| Hand) w|
|00000230| 72 6f 74 65 3a 0a 3e 49 | 20 61 6d 20 62 75 69 6c |rote:.>I| am buil|
|00000240| 64 69 6e 67 20 61 20 67 | 72 6f 75 70 20 6f 66 20 |ding a g|roup of |
|00000250| 67 65 6e 65 72 61 6c 20 | 66 75 6e 63 74 69 6f 6e |general |function|
|00000260| 73 20 77 68 69 63 68 20 | 61 72 65 0a 3e 73 74 6f |s which |are.>sto|
|00000270| 72 65 64 20 69 6e 20 61 | 20 66 69 6c 65 20 63 61 |red in a| file ca|
|00000280| 6c 6c 65 64 20 22 4d 79 | 55 74 69 6c 73 5c 47 65 |lled "My|Utils\Ge|
|00000290| 6e 55 74 69 6c 2e 63 70 | 70 22 2e 20 20 48 6f 77 |nUtil.cp|p". How|
|000002a0| 20 64 6f 20 49 0a 3e 64 | 65 63 6c 61 72 65 20 65 | do I.>d|eclare e|
|000002b0| 61 63 68 20 66 75 6e 63 | 74 69 6f 6e 20 73 6f 20 |ach func|tion so |
|000002c0| 74 68 61 74 20 74 68 65 | 79 20 61 72 65 20 61 76 |that the|y are av|
|000002d0| 61 69 6c 61 62 6c 65 20 | 74 6f 20 61 6e 6f 74 68 |ailable |to anoth|
|000002e0| 65 72 0a 3e 66 69 6c 65 | 20 69 6e 20 61 6e 6f 74 |er.>file| in anot|
|000002f0| 68 65 72 20 64 69 72 65 | 63 74 6f 72 79 2c 20 69 |her dire|ctory, i|
|00000300| 65 2e 20 74 68 65 79 20 | 68 61 76 65 20 67 6c 6f |e. they |have glo|
|00000310| 62 61 6c 20 61 63 63 65 | 73 73 2c 20 73 6f 0a 3e |bal acce|ss, so.>|
|00000320| 74 68 65 79 20 63 61 6e | 20 62 65 20 75 73 65 64 |they can| be used|
|00000330| 20 62 79 20 6f 74 68 65 | 72 20 70 72 6f 6a 65 63 | by othe|r projec|
|00000340| 74 73 2e 20 0a 3e 5b 73 | 6e 69 70 5d 0a 4c 65 74 |ts. .>[s|nip].Let|
|00000350| 27 73 20 70 72 65 74 65 | 6e 64 20 74 68 61 74 20 |'s prete|nd that |
|00000360| 4d 79 55 74 69 6c 73 5c | 47 65 6e 55 74 69 6c 2e |MyUtils\|GenUtil.|
|00000370| 63 70 70 20 69 73 20 69 | 6e 20 61 20 70 72 6f 6a |cpp is i|n a proj|
|00000380| 65 63 74 20 63 61 6c 6c | 65 64 20 4d 79 55 74 69 |ect call|ed MyUti|
|00000390| 6c 73 20 61 6e 64 20 74 | 68 61 74 20 0a 50 72 6f |ls and t|hat .Pro|
|000003a0| 67 72 61 6d 73 5c 4d 79 | 41 70 70 2e 63 70 70 20 |grams\My|App.cpp |
|000003b0| 69 73 20 69 6e 20 61 20 | 70 72 6f 6a 65 63 74 20 |is in a |project |
|000003c0| 63 61 6c 6c 65 64 20 4d | 79 41 70 70 2e 0a 0a 57 |called M|yApp...W|
|000003d0| 68 61 74 20 79 6f 75 20 | 6e 65 65 64 20 74 6f 20 |hat you |need to |
|000003e0| 64 6f 20 69 73 20 68 61 | 76 65 20 74 68 65 20 4d |do is ha|ve the M|
|000003f0| 79 55 74 69 6c 73 20 70 | 72 6f 6a 65 63 74 20 70 |yUtils p|roject p|
|00000400| 72 6f 64 75 63 65 20 61 | 20 4c 69 62 72 61 72 79 |roduce a| Library|
|00000410| 20 28 6f 6e 65 20 6f 66 | 20 74 68 65 20 74 61 72 | (one of| the tar|
|00000420| 67 65 74 20 0a 74 79 70 | 65 73 20 61 6c 6c 6f 77 |get .typ|es allow|
|00000430| 65 64 20 66 6f 72 20 61 | 20 70 72 6f 6a 65 63 74 |ed for a| project|
|00000440| 29 2e 20 20 54 6f 20 64 | 6f 20 74 68 69 6e 67 73 |). To d|o things|
|00000450| 20 70 72 6f 70 65 72 6c | 79 2c 20 79 6f 75 20 73 | properl|y, you s|
|00000460| 68 6f 75 6c 64 20 61 6c | 73 6f 20 63 72 65 61 74 |hould al|so creat|
|00000470| 65 20 61 20 0a 47 65 6e | 55 74 69 6c 73 2e 68 20 |e a .Gen|Utils.h |
|00000480| 66 69 6c 65 20 64 65 63 | 6c 61 72 69 6e 67 20 79 |file dec|laring y|
|00000490| 6f 75 72 20 69 6e 74 65 | 72 66 61 63 65 20 74 6f |our inte|rface to|
|000004a0| 20 74 68 65 20 75 74 69 | 6c 69 74 69 65 73 20 64 | the uti|lities d|
|000004b0| 65 66 69 6e 65 64 20 69 | 6e 20 47 65 6e 55 74 69 |efined i|n GenUti|
|000004c0| 6c 73 2e 63 70 70 2e 20 | 20 0a 28 59 6f 75 20 70 |ls.cpp. | .(You p|
|000004d0| 72 6f 62 61 62 6c 79 20 | 61 6c 72 65 61 64 79 20 |robably |already |
|000004e0| 6b 6e 6f 77 20 74 68 69 | 73 2c 20 62 75 74 20 62 |know thi|s, but b|
|000004f0| 65 20 73 75 72 65 20 79 | 6f 75 20 23 69 6e 63 6c |e sure y|ou #incl|
|00000500| 75 64 65 20 47 65 6e 55 | 74 69 6c 73 2e 68 20 69 |ude GenU|tils.h i|
|00000510| 6e 20 47 65 6e 55 74 69 | 6c 73 2e 63 70 70 3b 20 |n GenUti|ls.cpp; |
|00000520| 0a 69 74 20 70 72 65 76 | 65 6e 74 73 20 73 75 72 |.it prev|ents sur|
|00000530| 70 72 69 73 65 73 20 77 | 68 65 6e 20 79 6f 75 72 |prises w|hen your|
|00000540| 20 69 6e 74 65 72 66 61 | 63 65 20 67 65 74 73 20 | interfa|ce gets |
|00000550| 6f 75 74 20 6f 66 20 73 | 79 6e 63 20 77 69 74 68 |out of s|ync with|
|00000560| 20 79 6f 75 72 20 75 74 | 69 6c 69 74 79 2e 20 20 | your ut|ility. |
|00000570| 4f 66 20 0a 63 6f 75 72 | 73 65 2c 20 74 68 61 74 |Of .cour|se, that|
|00000580| 20 63 6f 75 6c 64 20 6e | 65 76 65 72 20 68 61 70 | could n|ever hap|
|00000590| 70 65 6e 2c 20 62 75 74 | 2e 2e 2e 20 3b 2d 29 20 |pen, but|... ;-) |
|000005a0| 29 2e 20 20 4f 6e 63 65 | 20 79 6f 75 20 68 61 76 |). Once| you hav|
|000005b0| 65 20 62 75 69 6c 74 20 | 4d 79 55 74 69 6c 73 2e |e built |MyUtils.|
|000005c0| 6c 69 62 2c 20 0a 79 6f | 75 27 72 65 20 72 65 61 |lib, .yo|u're rea|
|000005d0| 64 79 20 74 6f 20 67 6f | 2e 0a 0a 49 6e 63 6c 75 |dy to go|...Inclu|
|000005e0| 64 65 20 4d 79 55 74 69 | 6c 73 2e 6c 69 62 20 61 |de MyUti|ls.lib a|
|000005f0| 73 20 61 20 6e 6f 74 2d | 62 75 69 6c 74 20 69 74 |s a not-|built it|
|00000600| 65 6d 20 69 6e 20 74 68 | 65 20 4d 79 41 70 70 20 |em in th|e MyApp |
|00000610| 70 72 6f 6a 65 63 74 2e | 20 20 49 20 66 6f 72 67 |project.| I forg|
|00000620| 65 74 20 77 68 65 74 68 | 65 72 20 79 6f 75 20 0a |et wheth|er you .|
|00000630| 68 61 76 65 20 74 6f 20 | 69 6e 63 6c 75 64 65 20 |have to |include |
|00000640| 69 74 20 61 73 20 61 20 | 6e 6f 74 2d 62 75 69 6c |it as a |not-buil|
|00000650| 74 20 74 61 72 67 65 74 | 20 28 6f 6e 65 20 6f 66 |t target| (one of|
|00000660| 20 74 68 65 20 4e 6f 64 | 65 20 74 79 70 65 73 20 | the Nod|e types |
|00000670| 79 6f 75 20 73 70 65 63 | 69 66 79 20 77 68 65 6e |you spec|ify when|
|00000680| 20 0a 61 64 64 69 6e 67 | 20 61 20 74 61 72 67 65 | .adding| a targe|
|00000690| 74 20 74 6f 20 61 20 70 | 72 6f 6a 65 63 74 29 20 |t to a p|roject) |
|000006a0| 6f 72 20 77 68 65 74 68 | 65 72 20 79 6f 75 20 63 |or wheth|er you c|
|000006b0| 61 6e 20 6a 75 73 74 20 | 69 6e 63 6c 75 64 65 20 |an just |include |
|000006c0| 69 74 20 61 73 20 61 6e | 6f 74 68 65 72 20 66 69 |it as an|other fi|
|000006d0| 6c 65 2e 20 20 0a 4d 61 | 6b 65 20 73 75 72 65 20 |le. .Ma|ke sure |
|000006e0| 79 6f 75 20 73 65 74 20 | 75 70 20 79 6f 75 72 20 |you set |up your |
|000006f0| 70 72 6f 6a 65 63 74 20 | 64 69 72 65 63 74 6f 72 |project |director|
|00000700| 79 20 70 61 74 68 73 20 | 74 6f 20 69 6e 63 6c 75 |y paths |to inclu|
|00000710| 64 65 20 74 68 65 20 64 | 69 72 65 63 74 6f 72 69 |de the d|irectori|
|00000720| 65 73 20 0a 63 6f 6e 74 | 61 69 6e 69 6e 67 20 47 |es .cont|aining G|
|00000730| 65 6e 55 74 69 6c 73 2e | 68 20 61 6e 64 20 47 65 |enUtils.|h and Ge|
|00000740| 6e 55 74 69 6c 73 2e 6c | 69 62 20 61 73 20 61 70 |nUtils.l|ib as ap|
|00000750| 70 72 6f 70 72 69 61 74 | 65 2e 20 20 23 49 6e 63 |propriat|e. #Inc|
|00000760| 6c 75 64 65 20 47 65 6e | 55 74 69 6c 73 2e 68 20 |lude Gen|Utils.h |
|00000770| 69 6e 20 0a 4d 79 41 70 | 70 2e 63 70 70 2c 20 63 |in .MyAp|p.cpp, c|
|00000780| 6f 6d 70 69 6c 65 2c 20 | 6c 69 6e 6b 2c 20 61 6e |ompile, |link, an|
|00000790| 64 20 72 75 6e 2e 20 20 | 49 74 20 73 68 6f 75 6c |d run. |It shoul|
|000007a0| 64 20 62 65 20 74 68 61 | 74 20 65 61 73 79 2e 0a |d be tha|t easy..|
|000007b0| 0a 3e 57 68 61 74 20 64 | 6f 20 49 20 68 61 76 65 |.>What d|o I have|
|000007c0| 20 74 6f 20 64 6f 3f 20 | 20 44 6f 65 73 20 4d 79 | to do? | Does My|
|000007d0| 47 65 6e 65 72 61 6c 46 | 75 6e 63 74 69 6f 6e 28 |GeneralF|unction(|
|000007e0| 29 20 68 61 76 65 20 74 | 6f 20 62 65 20 65 78 74 |) have t|o be ext|
|000007f0| 65 72 6e 3f 0a 59 6f 75 | 20 6d 61 79 20 6e 6f 74 |ern?.You| may not|
|00000800| 20 68 61 76 65 20 74 6f | 20 6d 61 6b 65 20 4d 79 | have to| make My|
|00000810| 47 65 6e 65 72 61 6c 46 | 75 6e 63 74 69 6f 6e 28 |GeneralF|unction(|
|00000820| 29 20 65 78 74 65 72 6e | 3b 20 49 20 74 68 69 6e |) extern|; I thin|
|00000830| 6b 20 74 68 65 20 63 6f | 6d 70 69 6c 65 72 20 61 |k the co|mpiler a|
|00000840| 73 73 75 6d 65 73 20 69 | 74 20 0a 69 73 20 65 78 |ssumes i|t .is ex|
|00000850| 74 65 72 6e 61 6c 20 69 | 66 20 69 74 20 73 65 65 |ternal i|f it see|
|00000860| 73 20 61 20 66 75 6e 63 | 74 69 6f 6e 20 64 65 63 |s a func|tion dec|
|00000870| 6c 61 72 61 74 69 6f 6e | 20 61 6e 64 20 64 6f 65 |laration| and doe|
|00000880| 73 6e 27 74 20 66 69 6e | 64 20 61 20 66 75 6e 63 |sn't fin|d a func|
|00000890| 74 69 6f 6e 20 64 65 66 | 69 6e 69 74 69 6f 6e 2e |tion def|inition.|
|000008a0| 20 0a 49 74 27 73 20 75 | 73 75 61 6c 6c 79 20 61 | .It's u|sually a|
|000008b0| 20 67 6f 6f 64 20 69 64 | 65 61 20 74 6f 20 70 75 | good id|ea to pu|
|000008c0| 74 20 65 78 74 65 72 6e | 20 61 68 65 61 64 20 6f |t extern| ahead o|
|000008d0| 66 20 66 75 6e 63 74 69 | 6f 6e 20 64 65 63 6c 61 |f functi|on decla|
|000008e0| 72 61 74 69 6f 6e 73 20 | 69 6e 20 68 65 61 64 65 |rations |in heade|
|000008f0| 72 20 0a 66 69 6c 65 73 | 2e 20 20 49 66 20 74 68 |r .files|. If th|
|00000900| 65 20 63 6f 6d 70 69 6c | 65 72 20 66 69 6e 64 73 |e compil|er finds|
|00000910| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 64 65 | the fun|ction de|
|00000920| 66 69 6e 69 74 69 6f 6e | 20 2d 2d 20 61 73 20 69 |finition| -- as i|
|00000930| 74 20 77 6f 75 6c 64 20 | 77 68 65 6e 20 63 6f 6d |t would |when com|
|00000940| 70 69 6c 69 6e 67 20 0a | 47 65 6e 55 74 69 6c 73 |piling .|GenUtils|
|00000950| 2e 63 70 70 2c 20 77 68 | 69 63 68 20 23 69 6e 63 |.cpp, wh|ich #inc|
|00000960| 6c 75 64 65 73 20 47 65 | 6e 55 74 69 6c 73 2e 68 |ludes Ge|nUtils.h|
|00000970| 20 2d 2d 20 69 74 20 69 | 67 6e 6f 72 65 73 20 74 | -- it i|gnores t|
|00000980| 68 65 20 65 78 74 65 72 | 6e 20 64 65 73 69 67 6e |he exter|n design|
|00000990| 61 74 69 6f 6e 2e 0a 0a | 49 27 6d 20 70 72 65 74 |ation...|I'm pret|
|000009a0| 74 79 20 73 75 72 65 20 | 74 68 61 74 20 77 69 6c |ty sure |that wil|
|000009b0| 6c 20 77 6f 72 6b 2e 20 | 20 49 27 6d 20 6e 6f 74 |l work. | I'm not|
|000009c0| 20 61 74 20 68 6f 6d 65 | 20 6e 6f 77 2c 20 77 68 | at home| now, wh|
|000009d0| 65 72 65 20 49 20 63 61 | 6e 20 74 72 79 20 69 74 |ere I ca|n try it|
|000009e0| 20 6f 75 74 20 28 49 27 | 6c 6c 20 0a 74 72 79 20 | out (I'|ll .try |
|000009f0| 69 74 20 74 6f 6e 69 67 | 68 74 2e 29 20 20 49 66 |it tonig|ht.) If|
|00000a00| 20 69 74 20 64 6f 65 73 | 6e 27 74 20 77 6f 72 6b | it does|n't work|
|00000a10| 2c 20 62 72 69 6e 67 20 | 69 74 20 62 61 63 6b 2e |, bring |it back.|
|00000a20| 0a 0a 42 65 73 74 20 52 | 65 67 61 72 64 73 2c 0a |..Best R|egards,.|
|00000a30| 4b 65 6e 74 6f 6e 20 53 | 6d 69 74 68 0a 73 6d 69 |Kenton S|mith.smi|
|00000a40| 74 68 65 6b 40 69 78 2e | 6e 65 74 63 6f 6d 2e 63 |thek@ix.|netcom.c|
|00000a50| 6f 6d 0a 4f 52 0a 73 6d | 69 74 68 65 6b 40 61 6f |om.OR.sm|ithek@ao|
|00000a60| 6c 2e 63 6f 6d 0a 0a 0a | |l.com...| |
+--------+-------------------------+-------------------------+--------+--------+